#include "wm_hal.h"
#include "st7567.h"
 
void HAL_MspInit(void)
{
 
}

#if ST7567_HARDWARE_SPI
void HAL_SPI_MspInit(SPI_HandleTypeDef* hspi)
{
    __HAL_RCC_SPI_CLK_ENABLE();
    __HAL_AFIO_REMAP_SPI_CS(ST7567_CS_PORT, ST7567_CS_PIN);
    __HAL_AFIO_REMAP_SPI_CLK(ST7567_SCK_PORT, ST7567_SCK_PIN);
    __HAL_AFIO_REMAP_SPI_MOSI(ST7567_MOSI_PORT, ST7567_MOSI_PIN);
}

void HAL_SPI_MspDeInit(SPI_HandleTypeDef* hspi)
{
    __HAL_RCC_SPI_CLK_DISABLE();
    HAL_GPIO_DeInit(ST7567_CS_PORT, ST7567_CS_PIN);
    HAL_GPIO_DeInit(ST7567_SCK_PORT, ST7567_SCK_PIN);
    HAL_GPIO_DeInit(ST7567_MOSI_PORT, ST7567_MOSI_PIN);
}
#endif